QReadWriteLock: fix data race on the d_ptr members
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Wed, 31 Dec 2025 10:28:57 +0000 (13:28 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Wed, 31 Dec 2025 10:28:57 +0000 (13:28 +0300)
commitea0dc295685f416f54b920dceb1016b550b34473
tree593e65044ef8f3e8ed6031ed740cea6c653025f7
parentaf5826fc3a031bd52cce3d650a650cc7acd26b4d
QReadWriteLock: fix data race on the d_ptr members

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit?id=80d01c4ccb697b9d
Last-Update: 2025-12-14

The loadRelaxed() at the beginning of tryLockForRead/tryLockForWrite
isn't enough to bring us the non-atomic write of the recursive bool.
Same issue with the std::mutex itself.

Gbp-Pq: Name qreadwritelock_data_race.diff
src/corelib/thread/qreadwritelock.cpp